package com.lanhe.identifier.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.lanhe.identifier.domain.LhIdentifier;
import com.lanhe.identifier.domain.vo.LhIdentifierStatVO;
import com.lanhe.identifier.mapper.LhIdentifierMapper;
import com.lanhe.identifier.service.ILhIdentifierService;

/**
 * 识别码(LhIdentifier)表服务实现类
 *
 * @author zhanggl
 * @since 2023-09-18 20:07:32
 */
@Service
public class LhIdentifierServiceImpl  implements ILhIdentifierService {

	@Autowired
	private LhIdentifierMapper lhIdentifierMapper;

	/**
	 * 根据条件分页查询识别码列表
	 *
	 * @param identifier 识别码
	 * @return 识别码信息集合信息
	 */
	@Override
	public List<LhIdentifier> selectIdentifierList (LhIdentifier identifier) {
		return lhIdentifierMapper.selectIdentifierList(identifier);
	}

	/**
	 * 查询识别码信息
	 *
	 * @param identifierId 组ID
	 * @return 识别码信息
	 */
	@Override
	public LhIdentifier selectIdentifierById (Long identifierId) {
		return lhIdentifierMapper.selectIdentifierById(identifierId);
	}

	/**
	 * 批量查询识别码信息
	 *
	 * @param identifierIds 组IDs
	 * @return 识别码信息集合
	 */
	@Override
	public List<LhIdentifier> selectIdentifierByIds (Long[] identifierIds) {
		return lhIdentifierMapper.selectIdentifierByIds(identifierIds);
	}

	/**
	 * 新增识别码信息
	 *
	 * @param identifier 识别码信息
	 * @return 结果
	 */
	@Override
	public int insertIdentifier (List<LhIdentifier> identifier) {

		return lhIdentifierMapper.insertIdentifier(identifier);
	}

	/**
	 * 批量删除识别码信息
	 *
	 * @param identifierIds 需要删除的参数ID
	 * @return 结果
	 */
	@Override
	public int deleteIdentifierByIds (Long[] identifierIds) {
		return lhIdentifierMapper.deleteIdentifierByIds(identifierIds);
	}

	/**
	 * 提取有效识别码
	 *
	 * @param number 提取数量
	 * @return 结果
	 */
	@Override
	public List<LhIdentifier> extractByNumber(Integer number) {
		return lhIdentifierMapper.extractByNumber(number);
	}

	/**
	 * 修改已提取的效识别码
	 *
	 * @param identifierIds 提取数量
	 * @return 结果
	 */
	@Override
	public int updateExtractStatus(Long[] identifierIds) {
		return lhIdentifierMapper.updateExtractStatus(identifierIds);
	}

	/**
	 * 统计已提取、未提取
	 *
	 * @return 结果
	 */
	@Override
	public LhIdentifierStatVO stat() {
		return lhIdentifierMapper.stat();
	}
}

